package model

import (
	"time"
)

// TkMemberOpenIDChangeLog 用户openId变更记录
type TkMemberOpenIDChangeLog struct {
	ID        uint64     `gorm:"column:id;type:int(11);primary_key;AUTO_INCREMENT" json:"id"`
	UserID    int        `gorm:"column:user_id;type:int(11);default:0;NOT NULL" json:"user_id"` // 用户ID
	OpenID    string     `gorm:"column:open_id;type:varchar(64);NOT NULL" json:"open_id"`
	UnionID   string     `gorm:"column:union_id;type:varchar(64);NOT NULL" json:"union_id"`
	UpdatedAt *time.Time `gorm:"column:updated_at;type:datetime;NOT NULL" json:"updated_at"`
	CreatedAt *time.Time `gorm:"column:created_at;type:datetime;NOT NULL" json:"created_at"` // 创建时间
}

// TableName table name
func (m *TkMemberOpenIDChangeLog) TableName() string {
	return "tk_member_open_id_change_log"
}
